package com.qyhl.webtv.commonlib.utils.view.gridviewpager;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

/**
 * Created by Cookie on 2017/1/16.
 */

public class WrapContentGridView extends GridView {
    public WrapContentGridView(Context context) {

        super(context);

    }


    public WrapContentGridView(Context context, AttributeSet attrs) {

        super(context, attrs);

    }


    public WrapContentGridView(Context context, AttributeSet attrs, int defStyle) {

        super(context, attrs, defStyle);

    }


    @Override

    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

        int heightSpec;

        heightSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);

        super.onMeasure(widthMeasureSpec, heightSpec);

    }
}
